Changing parents
Just an example how you would move an object under a different transform.
#
Exampleself.ourObject.tranform.parent = self.newParent.transform;
#
User VariablesComponent | variable |
---|---|
GameObject | self.ourObject |
GameObject | self.newParent |
#
FAQ#
Can I detach from the parent?Just change the value to nil.
self.ourObject.tranform.parent = nil;